﻿using Microsoft.CodeAnalysis;

namespace UIOC.CodeAnalysis.Diagnostics;

internal static class AutowiredAttributeMissingImplementationDiagnostic {

    public const string DiagnosticId = "UIOC0015";

    private const string Title = "'[Autowired]' 实现分析";
    private const string MessageFormat = "字段 '{0}' 被 '[Autowired]' 标注，但没有找到接口 '{1}' 的实现类";
    private const string Description = "检测标记了 '[Autowired]' 的字段类型没有相关的实现类";
    private const string Category = "Usage";

    public static readonly DiagnosticDescriptor Rule = new(
        DiagnosticId,
        Title,
        MessageFormat,
        Category,
        DiagnosticSeverity.Error,
        isEnabledByDefault: true,
        description: Description
    );
}
